#include "CPrimitive.h"
using namespace Content;

CPrimitive::CPrimitive()
{
  pPrimObj = new CObject();
  red = 100;
  green = 100;
  blue = 100;
}

CPrimitive::~CPrimitive()
{
  delete pPrimObj;
  delete[] vertices;
  delete[] indices;
}


void CPrimitive::setColor(const int r, const int g, const int b)
{
  red = r;
  green = g;
  blue = b;
}

void CPrimitive::getColor(int& r, int& g, int& b)
{
  r = red;
  g = green;
  b = blue;
}

void CPrimitive::setPos(const float x, const float y,const float z)
{
  
  pPrimObj->setPos(x,y,z);
  return;
}

void CPrimitive::getPos(float& x, float& y, float& z)
{
  pPrimObj->getPos(x,y,z);
  return;
}

void CPrimitive::moveVec(const float x, const float y, const float z)
{
  pPrimObj->moveVec(x,y,z);
  return;
}

void CPrimitive::yaw(const float f)
{
  pPrimObj->yaw(f);
  return;
}

void CPrimitive::pitch(const float f)
{
  pPrimObj->pitch(f);
  return;
}

void CPrimitive::roll(const float f)
{
  pPrimObj->roll(f);
  return;
}

void CPrimitive::getOrientation(float& yaw, float& pitch, float& roll)
{
  pPrimObj->getOrientation(yaw,pitch,roll);
  return;
}

float CPrimitive::getPitch()
{
  return pPrimObj->getPitch();
}

void CPrimitive::setPitch(const float f)
{
  pPrimObj->setPitch(f);
  return;
}

void CPrimitive::setYaw(const float f)
{
  pPrimObj->setYaw(f);
  return;
}

float CPrimitive::getYaw()
{
  return pPrimObj->getYaw();
}

void CPrimitive::setRoll(const float f)
{
  pPrimObj->setRoll(f);
  return;
}
float CPrimitive::getRoll()
{
  return pPrimObj->getRoll();
}

void CPrimitive::setVisible(const bool b)
{
  pPrimObj->setVisible(b);;
}

bool CPrimitive::isVisible()
{
  return pPrimObj->isVisible();
}



int CPrimitive::getNumVertices()
{
  return numVertices;
}
int CPrimitive::getNumIndices()
{
  return numIndices;
}

int CPrimitive::getNumTriangles()
{
  return numTriangles;
}
PrimitiveVertex const* CPrimitive::getVertices()
{
  return vertices;
}

WORD const* CPrimitive::getIndices()
{
  return indices;
}